package cn.zzuisa.bluebox.biz.device.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 使用设备记录
 * </p>
 *
 * @author Ao
 * @since 2018-12-20
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("g_device_log_record")
@ApiModel(value="logRecord对象", description="使用设备记录")
public class UnlockRecord extends Model<UnlockRecord> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "设备id")
    @TableField("deviceId")
    private Long deviceId;

    @ApiModelProperty(value = "使用设备人")
    @TableField("memberId")
    private Long memberId;

    @ApiModelProperty(value = "剩余电量")
    @TableField("dumpEnergy")
    private Integer dumpEnergy;

    @ApiModelProperty(value = "设备状态，1使用设备成功、2已关设备")
    @TableField("deviceStatus")
    private Integer deviceStatus;

    @ApiModelProperty(value = "记录时间")
    @TableField("saveTime")
    private LocalDateTime saveTime;
    @ApiModelProperty(value = "经度")
    private double latitude;
    @ApiModelProperty(value = "纬度")
    private double longitude;

    @ApiModelProperty(value = "使用设备地址")
    private String address;

    @ApiModelProperty(value = "使用设备类型1为蓝牙 2为NB,不传默认为1")
    @TableField("logType")
    private Integer logType;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
